/*
 * Copyright 2013-2019 Xia Jun(3979434@qq.com).
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 ***************************************************************************************
 *                                                                                     *
 *                        Website : http://www.farsunset.com                           *
 *                                                                                     *
 ***************************************************************************************
 */
package com.workcell.workdata.im.service;

import com.workcell.workdata.im.entity.Moment;
import com.workcell.workdata.im.model.vo.MomentVO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface MomentService {

	void add(Moment moment);

	void delete(long id);

	/**
	 * 查询空间时间线列表
	 * 
	 * @param uid
	 *            用户账户，用于 过滤空间访问限制相关逻辑
	 * @param page
	 *            分页信息
	 * @return
	 */
	Page<MomentVO> queryTimelinePage(Long uid, Pageable page);

	/**
	 * 查询我的空间记录
	 * 
	 * @param uid
	 *            用户账户
	 * @param page
	 *            分页信息
	 * @return
	 */
	Page<MomentVO> querySelfPage(Long uid, Pageable page);

	/**
	 * 查询某个用户的空间记录
	 *
	 * @param uid
	 *            当前用户账户
	 * @param makerId
	 *            查看的用户ID
	 * @param page
	 *            分页信息
	 * @return
	 */
	Page<MomentVO> queryOtherPage(Long uid, Long makerId, Pageable page);

	MomentVO findOne(long id, long uid);

	/**
	 * 查询最近5个带图片的朋友圈
	 *
	 * @param uid
	 *
	 * @return
	 */
	List<MomentVO> queryListGallery(Long uid);
}
